/**
* Copyright 2009 Waag Society <http://www.waag.org>
* This file is part of Annotrax.
*
* Annotrax is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Annotrax is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Annotrax.
* If not, see http://www.gnu.org/licenses/gpl.html
*/

function loadScriptAjax(scriptUrl)
{
	$.ajax({
		type: "GET",
		url: scriptUrl,
		dataType: "javascript",
		async:false,
		success: function(data)
		{
			eval(data)
		}
	});	
}
function loadScript(scriptUrl)
{
	var script = document.createElement("script");
	var head = document.getElementsByTagName("head")[0];
	var body = document.getElementsByTagName("body")[0];
	script.language = "text/javascript";
	script.src = scriptUrl;
	head.appendChild(script);
}

$(document).ready(function(){
	loadScriptAjax("/themes/default/js/lib/jquery-ui/ui/jquery.ui.core.js")
	loadScriptAjax("/themes/default/js/lib/jquery-ui/ui/jquery.ui.widget.js")
	loadScriptAjax("/themes/default/js/lib/jquery-ui/ui/jquery.effects.core.js")
	loadScriptAjax("/themes/default/js/lib/jquery-ui/ui/jquery.effects.drop.js")
	loadScriptAjax("/themes/default/js/lib/jquery-ui/ui/jquery.effects.fade.js")
	loadScriptAjax("/themes/default/js/lib/jquery-ui/ui/jquery.effects.slide.js")
	loadScriptAjax("/themes/default/js/lib/jquery-ui/ui/jquery.ui.accordion.js")
	loadScriptAjax("/themes/default/js/annotrax/jquery.spinbutton.js")
	loadScriptAjax("/themes/default/js/lib/jquery-plugins/jquery.scrollTo/jquery.scrollTo.js")
	loadScriptAjax("/themes/default/js/lib/jquery-plugins/jquery.form/jquery.form.js")
	loadScriptAjax("/themes/default/js/annotrax/data_objects.js")
	loadScriptAjax("/themes/default/js/annotrax/annotrax_time.js")
	loadScriptAjax("/themes/default/js/annotrax/annotrax_util.js")
	loadScriptAjax("/themes/default/js/annotrax/player_overlay.js")
	loadScriptAjax("/themes/default/js/annotrax/playlist_player.js")
	loadScriptAjax("/themes/default/js/annotrax/progress_bar.js")
	loadScriptAjax("/themes/default/js/annotrax/time_viewer.js")
	loadScriptAjax("/themes/default/js/annotrax/annotation_browser.js")
	loadScriptAjax("/themes/default/js/annotrax/annotation_viewer.js")
	loadScriptAjax("/themes/default/js/annotrax/annotation_form.js")
	loadScriptAjax("/themes/default/js/annotrax/annotation_maker.js")
	loadScriptAjax("/themes/default/js/annotrax/annotation_info.js")
	loadScriptAjax("/themes/default/js/annotrax/annotrax_main.js")
	//f = new MyNamespace.foo()
});






